if the locH of sprite the currentSpriteNum > (mySpriteWidth * -1) then
set the locH of sprite the currentSpriteNum to the locH of sprite the currentSpriteNum - myOffset
else
set the locH of sprite the currentSpriteNum to myWidth + mySpriteWidth
end if
end
on getBehaviorDescription
return "This moves a sprite from left to right by a value (myOffset) across a stage which is (myWidth) wide. If it goes beyond the stage boundary it restarts at the other side."
end
on getPropertyDescriptionList
set description to [:]
addProp(description, #mySpriteWidth, [#default: 25, #format: #integer, #comment: "Width of sprite:"])
addProp(description, #myOffset, [#comment: "Distance of pixels to move per frame:", #format: #integer, #default: 1])
addProp(description, #myWidth, [#comment: "Width of stage:", #format: #integer, #default: 640])